<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <title>background position</title>
    <style type="text/css" media="screen">
        #contain {border:1px solid #EEAEEE; width:500px; height:30px; overflow:hidden;}
        #text {margin-top:25px; height:auto; width:auto;}
    </style>
</head>
<body>
    <div id="contain"><div id="text"></div></div>
    <script type="text/javascript" charset="utf-8">
        function show_text(s) {
            var text = document.getElementById('text');
            text.innerHTML = s;
            var i = 0;
            var fn = function () {
                if ( i < 10)
                    text.style.marginTop = (25-i*2) + 'px';
                else 
                    clearInterval (temp);
                i++;
            }
            temp = setInterval (fn, 30);
        }
        show_text('hello world');
    </script>
</body>
</html>
